
class Animal{
    String name;
    String id;

    public void fun(){

        System.out.println("abc");
    }
    public Animal(){
        fun();
    }
}

class God extends Animal{
    String name;
    String cac;

    @Override
    public void fun() {
        System.out.println("dada");
    }
}

interface App{
             public static void fun(){
        System.out.println("111");
    }

    default void fun1(){
        System.out.println("11122");
    }
    public void fun3();
}

abstract class aqq{
    abstract public  void fun();
    public void fun1(){

    }
}

class ACC extends aqq{


    @Override
    public void fun() {

    }


}

public class Test8 {
    public static void main(String[] args) {
        Animal animal =  new God(); //调用子类构造的时候会调用父类的构造的；然后父类构造不是调用了fun函数，然后由于
           //子类对fun函数进行了重写所以我们就直接调用子类的
         String s1 = new String();
         s1="abcda";
        System.out.println(s1.length());
        System.out.println(s1.isEmpty());
        s1="";
        s1="abca";
        System.out.println(s1.isEmpty());
        String s2 = s1.substring(1,3);
        System.out.println(s2);
      s2 =   s2.replace('b','a');
        System.out.println(s2);

        String s3 = "123";
        int a = Integer.parseInt(s3);
        System.out.println(a);

        int[] arr=  new int[]{1,2,3,4,5};
        int[] arr1 = {1,2,3,4};
        for(int x:arr){
            System.out.println(x);
        }
    }
}
